<div class="title">
  <div class='content'>
    顾客资料
  </div>
  <div class='tools'>    
  <% if being_edited %>
    <% if @buyer.present? %>
    <%= link_to '编辑',
          edit_buyer_order_url(@buyer),  
          :remote => true,
          :method => :get
     %>
    <% else %>
    <%= link_to '添加', new_buyer_order_url(@order), :remote => true, :method => :get %>    
    <% end %>
  <% end %>
  </div>
</div>
<div class='info'>
  <% if @buyer.present? %>
  <table>
    <tr>
      <th>
        姓名：
      </th>
      <td>
        <%= @buyer.full_name %>
      </td>
    </tr>
    <tr>
      <th>
        性别：
      </th>
      <td>
        <%= t @buyer.sex %>
      </td>
    </tr>
    <tr>
      <th>
        联系电话：
      </th>
      <td colspan='3'>
        <%= @buyer.mobile %><%= @buyer.link_phone.present? ? " , #{@buyer.link_phone}" : '' %>
      </td>
    </tr>
    <tr>
      <th>
        交货地址：
      </th>
      <td colspan='3'>
        <%= @buyer.address %>
      </td>
    </tr>
  </table>    
  <% else %>
  <div class='no_buyer full_width'>
    <% if being_edited %>
    待<%=  link_to '添加', new_buyer_order_url(@order), :remote => true, :method => :get %>
    <% else %>
    未填写
    <% end %>
  </div>
  <% end %>
</div>
